import axios from '@/utils/request'

// 获取权限列表
export const getPermissionList = () => {
  return axios({
    url: '/sys/permission'

  })
}

// 新增权限
export const addPermission = data => {
  return axios({
    url: '/sys/permission',
    method: 'post',
    data
  })
}

// 获取权限详
export const getDetail = id => {
  return axios({
    url: '/sys/permission/' + id,
    method: 'get'
  })
}

// 编辑权限
export const edit = data => {
  return axios({
    url: '/sys/permission/' + data.id,
    method: 'put',
    data
  })
}

// 删除权限点
export const del = id => {
  return axios({
    url: '/sys/permission/' + id,
    method: 'delete'
  })
}
